package com.industrial.premu.service.impl;

import java.util.List;

import com.industrial.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.industrial.premu.mapper.PremuPioneerCountyMapper;
import com.industrial.premu.domain.PremuPioneerCounty;
import com.industrial.premu.service.IPremuPioneerCountyService;

/**
 * 亩产先锋区县Service业务层处理
 * 
 * @author ZHOUS
 * @date 2024-03-28
 */
@Service
public class PremuPioneerCountyServiceImpl implements IPremuPioneerCountyService 
{
    @Autowired
    private PremuPioneerCountyMapper premuPioneerCountyMapper;

    /**
     * 查询亩产先锋区县
     * 
     * @param baseId 亩产先锋区县主键
     * @return 亩产先锋区县
     */
    @Override
    public PremuPioneerCounty selectPremuPioneerCountyByBaseId(String baseId)
    {
        return premuPioneerCountyMapper.selectPremuPioneerCountyByBaseId(baseId);
    }

    /**
     * 查询亩产先锋区县列表
     * 
     * @param premuPioneerCounty 亩产先锋区县
     * @return 亩产先锋区县
     */
    @Override
    public List<PremuPioneerCounty> selectPremuPioneerCountyList(PremuPioneerCounty premuPioneerCounty)
    {
        return premuPioneerCountyMapper.selectPremuPioneerCountyList(premuPioneerCounty);
    }

    /**
     * 新增亩产先锋区县
     * 
     * @param premuPioneerCounty 亩产先锋区县
     * @return 结果
     */
    @Override
    public int insertPremuPioneerCounty(PremuPioneerCounty premuPioneerCounty)
    {
        premuPioneerCounty.setCreateTime(DateUtils.getNowDate());
        return premuPioneerCountyMapper.insertPremuPioneerCounty(premuPioneerCounty);
    }

    /**
     * 修改亩产先锋区县
     * 
     * @param premuPioneerCounty 亩产先锋区县
     * @return 结果
     */
    @Override
    public int updatePremuPioneerCounty(PremuPioneerCounty premuPioneerCounty)
    {
        return premuPioneerCountyMapper.updatePremuPioneerCounty(premuPioneerCounty);
    }

    /**
     * 批量删除亩产先锋区县
     * 
     * @param baseIds 需要删除的亩产先锋区县主键
     * @return 结果
     */
    @Override
    public int deletePremuPioneerCountyByBaseIds(String[] baseIds)
    {
        return premuPioneerCountyMapper.deletePremuPioneerCountyByBaseIds(baseIds);
    }

    /**
     * 删除亩产先锋区县信息
     * 
     * @param baseId 亩产先锋区县主键
     * @return 结果
     */
    @Override
    public int deletePremuPioneerCountyByBaseId(String baseId)
    {
        return premuPioneerCountyMapper.deletePremuPioneerCountyByBaseId(baseId);
    }

    @Override
    public List<PremuPioneerCounty> top10(PremuPioneerCounty premuPioneerCounty) {
        return premuPioneerCountyMapper.top10(premuPioneerCounty);
    }
}
